package com.zhd.grpcclient.controller;

import com.zhd.grpcclient.service.UserGrpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhanghuadi
 * @CreateDate: 2019/3/9 0009 16:10
 * @UpdateDate: 2019/3/9 0009 16:10
 * @UpdateRemark:
 * @Version: 1.0
 * @Description:
 */
@RestController
public class UserController {

    @Autowired
    private UserGrpcService userGrpcService;

    @GetMapping(value = "/add")
    public String add(){
        return userGrpcService.addUser();
    }

    @GetMapping(value = "/test")
    public String test(String name){
        return name;
    }
}
